package cn.kgc.hotel.dao;

import cn.kgc.hotel.entity.Food;
import cn.kgc.hotel.entity.FoodReserve;
import cn.kgc.hotel.entity.ReserveFoodNum;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FoodMapper {
    //查询所有餐品
    List<Food> searchFoods();

    //餐品预订,餐品预订表 food_reserve insert
    int addFoodReserve(@Param("foodReserve") FoodReserve foodReserve);

    //餐品预订，餐品表 food update
    int updateFood(@Param("reserveFoodNumList") List<ReserveFoodNum> reserveFoodNumList);

    //餐品预订，预订餐品数量表 reserve_food_num insert
    int addReserveFoodNum(@Param("reserveFoodNumList") List<ReserveFoodNum> reserveFoodNumList);

    //查询餐品预订
    List<FoodReserve> searchFoodReserve(@Param("userId") int userId);

    //取消餐品预订
    int cancelFoodReserve(@Param("reserveId") String reserveId);

}
